﻿namespace swe.Core
{
	public class StateResult
	{
		public static readonly int LoopCurrentState = 1;
		public static readonly int BreakFlow = 2;
		public static readonly int JumpToState = 3;

		private readonly int _result;
		private string _resultState;

		public int Result { get { return _result; } }
		public string ResultState { get { return _resultState; } }

		public static StateResult Create(int result)
		{
			return new StateResult(result);
		}

		public static StateResult NamedState(string state)
		{
			var rv = new StateResult(JumpToState) {_resultState = state};
			return rv;
		}

		private StateResult(int result)
		{
			_result = result;
		}
	}
}
